package com.luckberry.murder.service;

import com.luckberry.murder.entity.game.Appraise;
import com.luckberry.murder.entity.game.Game;
import com.luckberry.murder.entity.game.Participant;

import java.util.List;

public interface GameService {

    /**
     * game
     */
    List<Game> getGames();

    Game getGame(int gid);

    Game getGameByUser(int uid);

    boolean addGame(Game game);

    boolean deleteGame(int gid);

     boolean deleteGameByUser(int uid);

    boolean editGame(Game game);

    /**
     * appraise
     */
    List<Appraise> getAppraises();

    List<Appraise> getAppraisesBySid(int sid);

    Appraise getAppraise(int aid);

    Appraise getAppraiseByUser(int uid);

    boolean addAppraise(Appraise appraise);

    boolean deleteAppraise(int aid);

    boolean editAppraise(Appraise appraise);

    /**
     * participant
     */
    List<Participant> getParticipants();

    List<Participant> getParticipantsByGame(int gid);

    Participant getParticipantByUser(int uid);

    boolean isJoin(Participant participant);

    boolean addParticipant(Participant participant);

    boolean deleteParticipantByUser(int uid);

    boolean deleteParticipantByGame(int gid);
}
